package com.cloudwise.service.impl;

import cn.hutool.db.Entity;
import com.cloudwise.dao.PersonDao;
import com.cloudwise.dao.impl.PersonDaoImpl;
import com.cloudwise.service.PersonService;

import java.util.List;
import java.util.Map;

/**
 * @author ：Teacher陈（86521760@qq.com）
 * @date ：Created in 2023/2/15 16:11
 * @description：人员业务接口实现类
 * @modified By：
 * @version: 1.0
 */
public class PersonServiceImpl  implements PersonService {
    /**
     * 实例化一个dao对象
     */
    PersonDao personDao = new PersonDaoImpl();
    @Override
    public List<Entity> queryAll() {
        return personDao.queryAll();
    }

    @Override
    public boolean deletePersonById(Object id) {
        return personDao.deletePersonById(id);
    }

    @Override
    public boolean savePerson(Map<String, Object> map) {
        return personDao.savePerson(map);
    }

    @Override
    public Entity queryPersonById(Object id) {
        return personDao.queryPersonById(id);
    }

    @Override
    public boolean updatePerson(Map<String, Object> map) {

        return personDao.updatePerson(map);
    }
}
